﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BISPOS.Repository
{
    public class PaymentRepository
    {
        BISPOSDataClassesDataContext db = new BISPOSDataClassesDataContext();
        public IEnumerable<PaymentType> AllPaymentType()
        {
            return db.PaymentTypes.OrderBy(x => x.Id);
        }
        public IEnumerable<PaymentType> CashPaymentTypes()
        {
            return db.PaymentTypes.Where(x => !x.IsCredit);
        }
        public IEnumerable<PaymentType> CreditPaymentTypes()
        {
            return db.PaymentTypes.Where(x => x.IsCredit);
        }

    }
}
